package com.kyxx.topics.net;

import android.content.Context;

import com.lzy.okgo.OkGo;
import com.lzy.okgo.cache.CacheMode;
import com.lzy.okgo.callback.AbsCallback;
import com.lzy.okgo.model.HttpParams;

import okhttp3.Call;
import okhttp3.Response;

/**
 * Created by Administrator on 2016/10/19.
 */
public abstract class OkGoRequest {
    public static void get(String url, Object tag, String cacheKey, CacheMode cacheMode, AbsCallback okGoCallBack) {
        OkGo.get(url).tag(tag).cacheKey(cacheKey).cacheMode(cacheMode).execute(okGoCallBack);
    }
    public static void post(String url, Object tag, String cacheKey, CacheMode cacheMode, HttpParams httpParams, AbsCallback okGoCallBack) {
        OkGo.post(url).tag(tag).cacheKey(cacheKey).cacheMode(cacheMode).params(httpParams).execute(okGoCallBack);
    }
}
